Integrand size = 8, antiderivative size = 79 \[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=x \cos \left (a+\frac {b}{x^2}\right )+\sqrt {b} \sqrt {2 \pi } \cos (a) \operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )+\sqrt {b} \sqrt {2 \pi } \operatorname {FresnelC}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right ) \sin (a) \]
[Out]
Time = 0.05 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {3441, 3469, 3434, 3433, 3432} \[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=\sqrt {2 \pi } \sqrt {b} \sin (a) \operatorname {FresnelC}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )+\sqrt {2 \pi } \sqrt {b} \cos (a) \operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )+x \cos \left (a+\frac {b}{x^2}\right ) \]
[In]
[Out]
Rule 3432
Rule 3433
Rule 3434
Rule 3441
Rule 3469
Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {\cos \left (a+b x^2\right )}{x^2} \, dx,x,\frac {1}{x}\right ) \\ & = x \cos \left (a+\frac {b}{x^2}\right )+(2 b) \text {Subst}\left (\int \sin \left (a+b x^2\right ) \, dx,x,\frac {1}{x}\right ) \\ & = x \cos \left (a+\frac {b}{x^2}\right )+(2 b \cos (a)) \text {Subst}\left (\int \sin \left (b x^2\right ) \, dx,x,\frac {1}{x}\right )+(2 b \sin (a)) \text {Subst}\left (\int \cos \left (b x^2\right ) \, dx,x,\frac {1}{x}\right ) \\ & = x \cos \left (a+\frac {b}{x^2}\right )+\sqrt {b} \sqrt {2 \pi } \cos (a) \operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )+\sqrt {b} \sqrt {2 \pi } \operatorname {FresnelC}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right ) \sin (a) \\ \end{align*}
Time = 0.15 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.01 \[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=x \cos (a) \cos \left (\frac {b}{x^2}\right )+\sqrt {b} \sqrt {2 \pi } \left (\cos (a) \operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )+\operatorname {FresnelC}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right ) \sin (a)\right )-x \sin (a) \sin \left (\frac {b}{x^2}\right ) \]
[In]
[Out]
Time = 0.48 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.72
method | result | size |
derivativedivides | \(x \cos \left (a +\frac {b}{x^{2}}\right )+\sqrt {b}\, \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (a \right ) \operatorname {S}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )+\sin \left (a \right ) \operatorname {C}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )\right )\) | \(57\) |
default | \(x \cos \left (a +\frac {b}{x^{2}}\right )+\sqrt {b}\, \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (a \right ) \operatorname {S}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )+\sin \left (a \right ) \operatorname {C}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )\right )\) | \(57\) |
risch | \(\frac {i {\mathrm e}^{-i a} b \sqrt {\pi }\, \operatorname {erf}\left (\frac {\sqrt {i b}}{x}\right )}{2 \sqrt {i b}}-\frac {i {\mathrm e}^{i a} b \sqrt {\pi }\, \operatorname {erf}\left (\frac {\sqrt {-i b}}{x}\right )}{2 \sqrt {-i b}}+x \cos \left (\frac {a \,x^{2}+b}{x^{2}}\right )\) | \(74\) |
meijerg | \(-\frac {\cos \left (a \right ) \sqrt {\pi }\, \sqrt {2}\, \left (b^{2}\right )^{\frac {1}{4}} \left (-\frac {4 x \sqrt {2}\, \cos \left (\frac {b}{x^{2}}\right )}{\sqrt {\pi }\, \left (b^{2}\right )^{\frac {1}{4}}}-\frac {8 \sqrt {b}\, \operatorname {S}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )}{\left (b^{2}\right )^{\frac {1}{4}}}\right )}{8}+\frac {\sqrt {\pi }\, \sin \left (a \right ) \sqrt {2}\, \sqrt {b}\, \left (-\frac {4 \sqrt {2}\, x \sin \left (\frac {b}{x^{2}}\right )}{\sqrt {b}\, \sqrt {\pi }}+8 \,\operatorname {C}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )\right )}{8}\) | \(110\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.92 \[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=\sqrt {2} \pi \sqrt {\frac {b}{\pi }} \cos \left (a\right ) \operatorname {S}\left (\frac {\sqrt {2} \sqrt {\frac {b}{\pi }}}{x}\right ) + \sqrt {2} \pi \sqrt {\frac {b}{\pi }} \operatorname {C}\left (\frac {\sqrt {2} \sqrt {\frac {b}{\pi }}}{x}\right ) \sin \left (a\right ) + x \cos \left (\frac {a x^{2} + b}{x^{2}}\right ) \]
[In]
[Out]
\[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=\int \cos {\left (a + \frac {b}{x^{2}} \right )}\, dx \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.38 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.61 \[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=\frac {\sqrt {2} {\left (2 \, \sqrt {2} b x^{2} \sqrt {\frac {1}{x^{4}}} \cos \left (\frac {a x^{2} + b}{x^{2}}\right ) + {\left ({\left (\left (i + 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {i \, b}{x^{2}}}\right ) - 1\right )} - \left (i - 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-\frac {i \, b}{x^{2}}}\right ) - 1\right )}\right )} \cos \left (a\right ) + {\left (-\left (i - 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {i \, b}{x^{2}}}\right ) - 1\right )} + \left (i + 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-\frac {i \, b}{x^{2}}}\right ) - 1\right )}\right )} \sin \left (a\right )\right )} b \left (\frac {b^{2}}{x^{4}}\right )^{\frac {1}{4}}\right )} \sqrt {x^{4}}}{4 \, b x} \]
[In]
[Out]
\[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=\int { \cos \left (a + \frac {b}{x^{2}}\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=\int \cos \left (a+\frac {b}{x^2}\right ) \,d x \]
[In]
[Out]